﻿using System.Web.Mvc;

namespace MusicStore.WebUI.Helpers
{
  public static class HtmlHelpers
  {
    public static string Truncate(this HtmlHelper helper, string input, int length)
    {
      if (input.Length <= length)
      {
        return input;
      }
      else
      {
        return input.Substring(0, length) + "...";
      }
    }
  }
}